package gruppoSoluzione.tests;

import gruppoSoluzione.mainService.ServiceDB;
import gruppoSoluzione.mainService.ServiceDBLog;
import gruppoSoluzione.mainService.ServiceDate;
import gruppoSoluzione.mainService.data.ServiceDBXML;

import java.util.Date;

public class ServiceDBLoaderTest {

	public static void main(String[] args) {
		
		ServiceDBXML loader=new ServiceDBXML();
		
		ServiceDB db=new ServiceDB();
		
		loader.loadDB(db);
		
		for (ServiceDate serviceDate : db.getServiceDates()) {
			Date date = serviceDate.getAsDate();
			
			System.out.println(date);
			
			Iterable<ServiceDBLog> logs=db.getLogsIterable(serviceDate);
			
			for (ServiceDBLog serviceDBLog : logs) {
				System.out.println(serviceDBLog);
			}
		}
		
	}
}

